feat: julia release type with registration included#2713
feat: julia release type with registration included#2713MilesCranmer wants to merge 8 commits intogoogleapis:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
1eb2c60 to
44d239b
Compare
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
44d239b to
5f59858
Compare
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
334080d to
e9d00a9
Compare
|
Confirming it works in production too, check it out: MilesCranmer/BorrowChecker.jl@d575261#commitcomment-180265743 Which creates |
chingor13
left a comment
There was a problem hiding this comment.
Let's separate the commenting logic out of this PR and separate it as it's an architectural thing that we have the correct abstraction for
| private buildJuliaRegistratorComment(release: CreatedRelease): string { | ||
| const subdir = | ||
| release.path === ROOT_PROJECT_PATH ? '' : ` subdir=${release.path}`; | ||
| const releaseNotes = release.notes?.trim() ?? ''; | ||
| if (!releaseNotes) { | ||
| return `@JuliaRegistrator register${subdir}`; | ||
| } | ||
| return `@JuliaRegistrator register${subdir}\n\nRelease notes:\n\nSee changelog below.\n\n${releaseNotes}`; | ||
| } | ||
|
|
||
| private async maybeRegisterJuliaReleases( | ||
| releases: CreatedRelease[] | ||
| ): Promise<void> { | ||
| for (const release of releases) { | ||
| const config = this.repositoryConfig[release.path]; | ||
| if (config.releaseType !== 'julia') continue; | ||
|
|
||
| await this.github.commentOnCommit( | ||
| this.buildJuliaRegistratorComment(release), | ||
| release.sha | ||
| ); | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Can we separate out this extra logic from the Julia strategy and file updates?
Everything in manifest.ts should be strategy/language-agnostic so it doesn't feel right having special logic for Julia here
This adds a
juliarelease strategy to release-please to support bothProject.tomlandJuliaProject.toml.As with other release please workflows, this:
This also tries to match other workflows in that after creating a release, it will post a Registrator commit comment with release notes so the Julia registry registration can be triggered automatically. (My fave part of using the rust workflow)
It also supports subdir packages by using
subdir=...in the Registrator triggerThis builds directly on the earlier Julia work in #2555, and extends it with the automatic Julia registry registration step after release creation.
I also tested the full workflow end-to-end against a fake Julia package and a fake clone of General:
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #2152 🦕
cc @chingor13 @ferrarimarco - would you be willing to review? This builds on #2555 and adds the Julia Registrator auto-registration step.
@joeycarpinelli this builds on your nice earlier PR.